import store from "../store";
export default (to,from,next)=>{
  let isLogin = store.state.loginFlag
  if (to.name !== 'Login' && to.name!=='Pass'&& to.name!=='Sing'&& !isLogin){ 
    next({ name: 'Login' })
  }else{
    next()
  }
}